from sqlalchemy import Boolean, Column, Integer, String, DateTime
from app.db.database import DBase

class Menu(DBase):
    __tablename__ = "Menus"

    id = Column(Integer, primary_key=True, index=True, autoincrement=True, comment="id")
    menu_name_cn = Column(String(30), nullable=False, unique=True, comment="菜单中文名称")
    menu_name_en = Column(String(30), nullable=False, unique=True, comment="菜单英文名称")
    router_name = Column(String(50), nullable=False, unique=True, comment="路由名称")
    component = Column(String(50), nullable=False, unique=True, comment="组件路径")
    icon = Column(String(20), nullable=True, comment="菜单图标")
    sort = Column(Integer, nullable=False, unique=True, comment="排序")
    disabled = Column(Boolean, nullable=False, unique=True, comment="禁启用状态,1:禁用,0:启用")
    redirect = Column(String(50), nullable=True, comment="重定向")
